using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;

namespace WPFTemplateLib.Enhance
{
	/// <summary>
	/// ObservableCollection 增强（带标识名称）
	/// </summary>
	/// <typeparam name="T"></typeparam>
	[Serializable]
	public class ObservableCollectionEx<T> : ObservableCollection<T>
	{
		#region 构造

		public ObservableCollectionEx() : base() { }
		public ObservableCollectionEx(List<T> list) : base(list) { }
		public ObservableCollectionEx(IEnumerable<T> collection) : base(collection) { }

		/// <summary>
		/// 构造函数
		/// </summary>
		/// <param name="tagName">标识名称</param>
		public ObservableCollectionEx(string tagName) : base()
		{
			TagName = tagName;
		}

		#endregion

		#region 属性

		/// <summary>
		/// 标识名称
		/// </summary>
		public string TagName { get; set; } 

		#endregion
	}
}
